for i in range(101):
    if i%3==0 and i%7==0:
        print(i)